package Exercise.FibonacciCoefficient;

public class Method2 {
    // 递归
    // 原理：fn(x) + fn(x - 1)
    //      fn(1) = fn(2) = 1
    public static int fn(int n) {
        if(n == 1 || n == 2)
            return 1;
        else
            return fn(n - 1) + fn(n - 2);
    }
    public static void main(String[] args) {
        System.out.println(fn(12));
    }
}
